package com.android.gilastv.bean;

import com.android.baselibrary.tool.Log;
import com.android.gilastv.manager.Config;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class CommVideoInfo  implements Serializable {
    public String id;
    public String url;
    public String name;
    public String hanyuName;
    public String synopsis;
    public String remark;
    public String coverId;  //封面
    public boolean likeFlag;   //是否喜欢
    public boolean collectFlag;   //是否收藏
    public List<VideoSets> videoSetsList;   //集数列表

    public VideoSets currentVideoSet;   //当前播放的集数
    public int currentSelectVideoIndex;   //当前集数

    public class VideoSets {
        public String id;
        public String number;   //集数
        public String sdFileId;  //
        public String fileId;  //
    }

    //获取封面
    public static String getCoverUrl(String coverId) {
        String imgUrl = Config.SERVER_HOST + "/openapi/video/cover/" + coverId;
        Log.i("imgurl:" + imgUrl);
        return imgUrl;
    }

    //获取封面
    public String getCoverUrl() {
        String imgUrl = Config.SERVER_HOST + "/openapi/video/cover/" + coverId;
        Log.i("imgurl:" + imgUrl);
        return imgUrl;
    }

    public static String getVideoUrl(String id) {
        String imgUrl = Config.SERVER_HOST + "/openapi/video/videoplay/" + id;
        return imgUrl;
    }


    public CommVideoInfo(String url, String title, String cover) {
        this.url = url;
        this.name = title;
        this.coverId = cover;
    }

    public static List<CommVideoInfo> getTestData() {
        List<CommVideoInfo> videoList = new ArrayList<>();
        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "花木兰", "https://pics1.baidu.com/feed/79f0f736afc37931c4ee2c435a3a6c4341a911df.jpeg?token=04ff272dd8409c490e2e79f4b68152fb"));
        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/2e667263vodcq1302771543/35f531fa243791580579982132/f0.mp4", "独行月球", "https://t11.baidu.com/it/u=3560979903,180046874&fm=30&app=106&f=JPEG?w=640&h=1074&s=8ED26D848052A5FF5EB0A40203003091"));
        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "千与千寻", "https://lmg.jj20.com/up/allimg/sj01/2012220224141Q6-0-lp.jpg"));

        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "泰坦尼克号", "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Fb226bd1e-312a-4fdc-abb2-9bde5c00a805%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1704541266&t=088e008f6008fa3b776870d2910fb1fb"));
        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "我不是药神", "https://img0.baidu.com/it/u=1266327119,3220987260&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=700"));
        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "蜘蛛侠", "https://imgs.tom.com/ent/202110/1009201250/CONTENT1634952954486.jpg"));
        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "唐人街探案", "https://img0.baidu.com/it/u=2864571064,3293739578&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=667"));
        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "你好李焕英", "https://t11.baidu.com/it/u=713502625,162230152&fm=30&app=106&f=JPEG?w=600&h=858&s=54A60EF6D4820EF949B64DEE0300801A"));
        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "夏洛特烦恼", "https://img1.baidu.com/it/u=3841124155,3776257340&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=666"));

        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "流浪地球", "https://hbimg.huabanimg.com/dd9b43dc1429d9fcfb3417d313ee95f9a0f7167449e29d-xjQolY_fw658"));
        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "疯狂外星人", "https://img0.baidu.com/it/u=355598117,436527002&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=708"));
        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "扫黑", "https://p0.itc.cn/q_70/images03/20210513/d8e47b2e9d504106a4388fe46e25b688.jpeg"));
        videoList.add(new CommVideoInfo("http://1302771543.vod2.myqcloud.com/0550600bvodtranscq1302771543/a4795483243791581010221952/v.f100030.mp4", "英雄", "https://pics1.baidu.com/feed/aa64034f78f0f7369a1be5fbf55d9411eac41377.jpeg?token=234160202da06e79753fd6becfc2fb60&s=F2B83CC51CD3ECD0102FCC360300505B"));


        return videoList;
    }
}
